<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"dw_zhouyu.gitee.io","root":"/blog/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="Virtual了一把，罚时爆炸&#x3D; &#x3D;">
<meta property="og:type" content="article">
<meta property="og:title" content="Codeforces Round #693 (Div. 3)">
<meta property="og:url" content="https://dw_zhouyu.gitee.io/blog/2021/01/12/Codeforces-Round-693-Div-3/index.html">
<meta property="og:site_name" content="DW_Zhouyu">
<meta property="og:description" content="Virtual了一把，罚时爆炸&#x3D; &#x3D;">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-01-12T09:28:12.000Z">
<meta property="article:modified_time" content="2021-01-12T10:19:34.595Z">
<meta property="article:author" content="DW_Zhouyu">
<meta property="article:tag" content="Online Contest">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://dw_zhouyu.gitee.io/blog/2021/01/12/Codeforces-Round-693-Div-3/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Codeforces Round #693 (Div. 3) | DW_Zhouyu</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript><!-- hexo-inject:begin --><!-- hexo-inject:end -->

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">DW_Zhouyu</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">从你所在的方向 到我将踏足的战场 遥遥相隔</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blog/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/blog/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://dw_zhouyu.gitee.io/blog/2021/01/12/Codeforces-Round-693-Div-3/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/avatar.gif">
      <meta itemprop="name" content="DW_Zhouyu">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="DW_Zhouyu">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Codeforces Round #693 (Div. 3)
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2021-01-12 17:28:12 / 修改时间：18:19:34" itemprop="dateCreated datePublished" datetime="2021-01-12T17:28:12+08:00">2021-01-12</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/Codeforces/" itemprop="url" rel="index"><span itemprop="name">Codeforces</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>Virtual了一把，罚时爆炸= =</p>
<a id="more"></a>
<h1 id="a-cards-for-friends">A Cards for Friends</h1>
<p>一张纸长 <span class="math inline">\(w\)</span> 宽 <span class="math inline">\(h\)</span> ，如果长或宽是偶数就可以对折一下，多次对折后，能不能折出至少 <span class="math inline">\(n\)</span> 张纸。</p>
<h1 id="b-fair-division">B Fair Division</h1>
<h2 id="题意">题意</h2>
<p>有 <span class="math inline">\(n\ (n\le100)\)</span> 个糖果，每个糖果要么是 <span class="math inline">\(1\)</span> 克，要么是 <span class="math inline">\(2\)</span> 克，求问能否分成重量相等的两部分。</p>
<h2 id="题解">题解</h2>
<p>第一反应是背包，但是仔细想了下可以直接分类讨论：</p>
<ol type="1">
<li>如果总重量是奇数，必定不行。</li>
<li>如果重量为 <span class="math inline">\(2\)</span> 的糖果数量为偶数，那么直接均分就行了。</li>
<li>如果是奇数，那么看是否有两个 <span class="math inline">\(1\)</span> 克的糖果凑一个，把数量从奇变偶。</li>
</ol>
<h1 id="c-long-jumps">C Long Jumps</h1>
<h2 id="题意-1">题意</h2>
<p>给出一个长度为 <span class="math inline">\(n\ (n\le2\times10^5)\)</span> 的数列 <span class="math inline">\(a_i\)</span> ，你可以任选起点，当你位于 <span class="math inline">\(i\)</span> 点时，进行如下判断：</p>
<ul>
<li>若 <span class="math inline">\(i+a_i\le n\)</span> ，则你的得分 <span class="math inline">\(+a[i]\)</span> ，并跳到 <span class="math inline">\(i+a_i\)</span> 点</li>
<li>若 <span class="math inline">\(i+a_i\ge n\)</span> ，则你的得分 <span class="math inline">\(+a[i]\)</span> ，此时直接结束。</li>
</ul>
<p>求你能获得的最大分数。</p>
<h2 id="题解-1">题解</h2>
<p>直接DP，<span class="math inline">\(DP[i]\)</span> 表示你到达 <span class="math inline">\(i\)</span> 点能得到的最大分数，因为每个点只能跳一个位置，所以转移数量是 <span class="math inline">\(O(n)\)</span> 的。</p>
<h1 id="d-even-odd-game">D Even-Odd Game</h1>
<h2 id="题意-2">题意</h2>
<p>给出 <span class="math inline">\(n\ (n\le2\times10^5)\)</span> 个数 <span class="math inline">\(a_i\)</span> ，Alice和Bob轮流取数，Alice先手。</p>
<p>如果Alice取得是偶数，她获得这个数作为得分，取奇数不得分；相反，Bob取奇数得分，取偶数不得分。</p>
<p>求游戏结果，输出胜利方或者平局。</p>
<h2 id="题解-2">题解</h2>
<p>双方一定从大到小取数，不会管是否得分都是这样。仔细考虑奇数偶数对双方收益收益即可。</p>
<h1 id="e-correct-placement">E Correct Placement</h1>
<h1 id="题意-3">题意</h1>
<p>给出 <span class="math inline">\(n\ (n\le2\times10^5)\)</span> 个矩形 <span class="math inline">\(w_i,\ h_i\)</span> ，对于一个矩形 <span class="math inline">\(i\)</span> ，求是否存在一个矩形 <span class="math inline">\(j\)</span> 能够完全覆盖，覆盖判断满足两者其一即可：</p>
<ul>
<li><span class="math inline">\(w_i&gt;w_j,\ h_i&gt;h_j\)</span></li>
<li><span class="math inline">\(h_i&gt;w_j,\ w_i&gt;h_j\)</span></li>
</ul>
<p>如果有，输出编号，没有输出 <span class="math inline">\(-1\)</span>。</p>
<h2 id="题解-3">题解</h2>
<p>可以离散化之后做个前缀最小，表示当 <span class="math inline">\(w\le i\)</span> 的时候，最小的 <span class="math inline">\(h\)</span> 能做到多少，并记录下是哪个矩形。</p>
<p>同样的给 <span class="math inline">\(h\)</span> 也做这样对应的前缀最小。</p>
<p>查询的时候 <span class="math inline">\(O(1)\)</span> 即可。</p>
<h1 id="f-new-years-puzzle">F New Year's Puzzle</h1>
<h2 id="题意-4">题意</h2>
<p>一个大小为 <span class="math inline">\(2\times n\ (n\le10^9)\)</span> 的矩形，其中有 <span class="math inline">\(m\ (m\le2\times10^5)\)</span> 个格子存在障碍物，求剩下的是否能被 <span class="math inline">\(1\times2\)</span> 和 <span class="math inline">\(2\times1\)</span> 的矩形覆盖。</p>
<h2 id="题解-4">题解</h2>
<p>直接从左到右分类填放即可，注意 <span class="math inline">\(n\)</span> 比较大，需要排序处理 <span class="math inline">\(m\)</span> 个障碍物，或者用 std::map。</p>
<h1 id="g-moving-to-the-capital">G Moving to the Capital</h1>
<h2 id="题意-5">题意</h2>
<p>给出一张 <span class="math inline">\(n\ (n\le2\times10^5)\)</span> 个点，<span class="math inline">\(m\ (m\le2\times10^5)\)</span> 条单向边的有向图，每条边的长度均为 <span class="math inline">\(1\)</span>，令 <span class="math inline">\(d_i\)</span> 表示从首都节点 <span class="math inline">\(1\)</span> 到 <span class="math inline">\(i\)</span> 点的最短路。</p>
<p>选择一个起点后开始遍历这张图，遍历过程中有三个选项：</p>
<ol type="1">
<li>若当前处于 <span class="math inline">\(i\)</span> 点，可沿着图上的边前往 <span class="math inline">\(j\)</span> 点，此时 <span class="math inline">\(d_i&lt;d_j\)</span> 。</li>
<li>若当前处于 <span class="math inline">\(i\)</span> 点，可沿着图上的边前往 <span class="math inline">\(j\)</span> 点，此时 <span class="math inline">\(d_i\ge d_j\)</span> 。</li>
<li>立即停止。</li>
</ol>
<p>遍历过程中最多使用一次第二个操作，停止时的 <span class="math inline">\(d_i\)</span> 为此次遍历的得分。</p>
<p>对于每一个点 <span class="math inline">\(i\)</span> ，求从这个点出发能够获得的最小得分。</p>
<h2 id="题解-5">题解</h2>
<p>因为使得 <span class="math inline">\(d_i\)</span> 减小的操作只能用一次，所以这次操作后一定会立刻停止，在这之前都是会使自己的 <span class="math inline">\(d_i\)</span> 变大的。</p>
<p>设 <span class="math inline">\(Ans_i\)</span> 表示 <span class="math inline">\(i\)</span> 点的答案，按照 <span class="math inline">\(d_i\)</span> 从大到小计算：</p>
<ol type="1">
<li><span class="math inline">\(Ans_i=d_i\)</span> ，表示立即停止的得分。</li>
<li>$Ans_i = min{Ans_j | d_j&gt;d_i} $ ，表示第一个操作，此时大于 <span class="math inline">\(d_i\)</span> 的点都算过答案了，所以可以转移。</li>
<li><span class="math inline">\(Ans_i=min\{d_j\ |\ d_j&lt;d_i\}\)</span> ，表示第二个操作。</li>
</ol>
<p>负责度为 <span class="math inline">\(O(nlogn)\)</span>，虽然转移是 <span class="math inline">\(O(n+m)\)</span> 的，但是需要一个排序。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blog/tags/Online-Contest/" rel="tag"># Online Contest</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/2021/01/07/Northern-Eurasia-Finals-Online-2020/" rel="prev" title="Northern Eurasia Finals Online 2020">
      <i class="fa fa-chevron-left"></i> Northern Eurasia Finals Online 2020
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#a-cards-for-friends"><span class="nav-number">1.</span> <span class="nav-text">A Cards for Friends</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#b-fair-division"><span class="nav-number">2.</span> <span class="nav-text">B Fair Division</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题意"><span class="nav-number">2.1.</span> <span class="nav-text">题意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#题解"><span class="nav-number">2.2.</span> <span class="nav-text">题解</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#c-long-jumps"><span class="nav-number">3.</span> <span class="nav-text">C Long Jumps</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题意-1"><span class="nav-number">3.1.</span> <span class="nav-text">题意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#题解-1"><span class="nav-number">3.2.</span> <span class="nav-text">题解</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#d-even-odd-game"><span class="nav-number">4.</span> <span class="nav-text">D Even-Odd Game</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题意-2"><span class="nav-number">4.1.</span> <span class="nav-text">题意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#题解-2"><span class="nav-number">4.2.</span> <span class="nav-text">题解</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#e-correct-placement"><span class="nav-number">5.</span> <span class="nav-text">E Correct Placement</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#题意-3"><span class="nav-number">6.</span> <span class="nav-text">题意</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题解-3"><span class="nav-number">6.1.</span> <span class="nav-text">题解</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#f-new-years-puzzle"><span class="nav-number">7.</span> <span class="nav-text">F New Year&#39;s Puzzle</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题意-4"><span class="nav-number">7.1.</span> <span class="nav-text">题意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#题解-4"><span class="nav-number">7.2.</span> <span class="nav-text">题解</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#g-moving-to-the-capital"><span class="nav-number">8.</span> <span class="nav-text">G Moving to the Capital</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#题意-5"><span class="nav-number">8.1.</span> <span class="nav-text">题意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#题解-5"><span class="nav-number">8.2.</span> <span class="nav-text">题解</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">DW_Zhouyu</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">12</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blog/tags/">
          
        <span class="site-state-item-count">6</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">DW_Zhouyu</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="/blog/lib/pjax/pjax.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/pisces.js"></script>


<script src="/blog/js/next-boot.js"></script>

  <script>
var pjax = new Pjax({
  selectors: [
    'head title',
    '#page-configurations',
    '.content-wrap',
    '.post-toc-wrap',
    '.languages',
    '#pjax'
  ],
  switches: {
    '.post-toc-wrap': Pjax.switches.innerHTML
  },
  analytics: false,
  cacheBust: false,
  scrollTo : !CONFIG.bookmark.enable
});

window.addEventListener('pjax:success', () => {
  document.querySelectorAll('script[data-pjax], script#page-configurations, #pjax script').forEach(element => {
    var code = element.text || element.textContent || element.innerHTML || '';
    var parent = element.parentNode;
    parent.removeChild(element);
    var script = document.createElement('script');
    if (element.id) {
      script.id = element.id;
    }
    if (element.className) {
      script.className = element.className;
    }
    if (element.type) {
      script.type = element.type;
    }
    if (element.src) {
      script.src = element.src;
      // Force synchronous loading of peripheral JS.
      script.async = false;
    }
    if (element.dataset.pjax !== undefined) {
      script.dataset.pjax = '';
    }
    if (code !== '') {
      script.appendChild(document.createTextNode(code));
    }
    parent.appendChild(script);
  });
  NexT.boot.refresh();
  // Define Motion Sequence & Bootstrap Motion.
  if (CONFIG.motion.enable) {
    NexT.motion.integrator
      .init()
      .add(NexT.motion.middleWares.subMenu)
      .add(NexT.motion.middleWares.postList)
      .bootstrap();
  }
  NexT.utils.updateSidebarPosition();
});
</script>




  















    <div id="pjax">
  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

    </div><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</body>
</html>
